<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>条件与循环</title>
</head>
<body>

<div id="app-3">
    <p v-if="seen">现在你看到我了</p>
</div>

<div id="app-4">
    <ol>
        <li v-for="todo in todos">
            {{todo.text}}
        </li>
    </ol>
</div>

<script src="../js/vue.js"></script>
<script>
    var app4 = new Vue({
        el: '#app-4',
        data: {
            todos: [
                {text: '学习JavaScript'},
                {text: '学习Vue'},
                {text: '学习Java'}
            ]
        }
    })

    var app3 = new Vue({
        el: '#app-3',
        data: {
            seen: true
        }
    })
</script>
</body>
</html>